package priv.ln.field_method.field.exer1;

/**
 * ClassName: EmployeeTest
 * Package: priv.ln.field_method.field
 * Description:
 *声明EmployeeTest测试类，并在main方法中，创建2个员工对象，并为属性赋值，并打印两个员工的信息。
 * @Author 辣辣
 * @Create 2024/6/17 17:02
 * @Version 1.0
 */
public class EmployeeTest {
    public static void main(String[] args) {
        Employee emp1 = new Employee();

        emp1.id = 1;
        emp1.name = "张三";
        emp1.age = 23;
        emp1.salary = 10000.0;
        System.out.println("员工1的编号：" + emp1.id + "，姓名：" + emp1.name
             + "，年龄：" + emp1.age + "，薪资：" + emp1.salary);

        Employee emp2 = new Employee();

        emp2.id = 2;
        emp2.name = "李四";
        emp2.age = 22;
        emp2.salary = 11000.0;
        System.out.println("员工2的编号：" + emp2.id + "，姓名：" + emp2.name
                + "，年龄：" + emp2.age + "，薪资：" + emp2.salary);

    }
}
